package com.dongdongshop.mapper;

import com.dongdongshop.data.PageResult;
import com.dongdongshop.domain.res.SpecificationRes;
import com.dongdongshop.model.Specification;
import com.dongdongshop.model.SpecificationOption;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;

import java.util.List;

public interface SpecMapper {

    /**
     * 规格分页查询
     * @param specification
     * @return
     */
    Page<Specification> queryPage(Specification specification);

    /**
     * 规格增加操作
     * @param specification
     * @return
     */
    void add(Specification specification);

    /**
     * 规格修改操作
     * @param specification
     */
    void update(Specification specification);

    @Delete("delete from tb_specification where id=#{id}")
    void delete(Long id);

    /**
     * 规格批量删除
     * @param ids
     */
    void batchRemove(List<Integer> ids);

}
